package org.ovirt.microvirt.beans;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.xml.bind.annotation.XmlRootElement;

import org.hibernate.search.annotations.Field;
import org.hibernate.search.annotations.Indexed;

@Entity
@Indexed
@XmlRootElement(name="pool")
public class VirtualMachinePool {
	@Id
	@Column(name="name")
	@Field
	String name;
	@OneToMany
	List<VirtualMachine> members = new ArrayList<VirtualMachine>();
	@ManyToOne
	VirtualMachineTemplate template;
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public List<VirtualMachine> getMembers() {
		return members;
	}
	public void setMembers(List<VirtualMachine> members) {
		this.members = members;
	}
	public VirtualMachineTemplate getTemplate() {
		return template;
	}
	public void setTemplate(VirtualMachineTemplate template) {
		this.template = template;
	}
}
